import styles from './index.css';
import react, { useState } from 'react'

export default function (props) {
  const [count, useCount] = useState(0)
  return (
    <div className={styles.normal}>
      <p>{count}</p>
      <button onClick={()=>useCount((s)=>s+1)}>+</button>
      {count>0&&<button onClick={()=>useCount((s)=>s-1)}>-</button>}
    </div>
  );
}
